#ifndef PBVP_LOOP_SHAPE_H
#define PBVP_LOOP_SHAPE_H

#include <vector>
#include "../math/Vector3.h"
#include "../data/geometrydata.h"
#include "shape.h"

namespace PBVP {
	/**
	 * Loop is represented as a sequence of connected tubes
	 */
	class Loop : public Shape
	{
	public:
		/// Default Constructor
		Loop(const std::vector<Vector3>& guide_points, double r);

		/// Destructor
		~Loop();

		///
		virtual void render();

	private:
		//
		std::vector<Vector3> backbone_points;
		//
		std::vector<Vector3> points;
		double radius;

		// number of sides for rendering the tube
		int sides;

		// number of interpolations between two adjacent backbone points
		// interp_steps = 1 means no-interpolation.
		int interp_steps;

		GeometryData *m_pGeoObject;

		///
		void constructGeometry();
	};
}

#endif